Skip to content

deprecate std::intrinsics::transmute etc, use std::mem::* instead#135003

Merged
bors merged 4 commits into
rust-lang:masterfrom
RalfJung:deprecate-allowed-through-unstable
Jan 15, 2025
Merged

deprecate std::intrinsics::transmute etc, use std::mem::* instead#135003
bors merged 4 commits into
rust-lang:masterfrom
RalfJung:deprecate-allowed-through-unstable

Conversation

@RalfJung
Copy link
Copy Markdown
Member

@RalfJung RalfJung commented Jan 1, 2025

The rustc_allowed_through_unstable_modules attribute lets users call std::mem::transmute as std::intrinsics::transmute. The former is a reexport of the latter, and for a long time we didn't properly check stability for reexports, so making this a hard error now would be a breaking change for little gain. But at the same time, std::intrinsics::transmute is not the intended path for this function, so I think it is a good idea to show a deprecation warning when that path is used. This PR implements that, for all the functions in std::intrinsics that carry the attribute.

I assume this will need @rust-lang/libs-api FCP.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.